<#import "/spring.ftl" as spring/>
<#import "/common/base.ftl" as base/>
<@base.page  "商品维护">
<style>
.goodsinfo{width: 100%;height: 34px;padding: 6px 12px;font-size: 14px;line-height: 1.42857143;color: #555;background-color: #fff;background-image: none;border: 1px solid #ccc;border-radius: 4px;}
.table-body{width:100%; height:300px;overflow-y:auto;overflow-x:hidden;margin-top:-10px;}
</style>

<div ng-controller="supplierGoodsController">
	<div class="row"  style="margin-left:10px;">
		<strong  margin-left:5px;><p style="font-size:20px">供应商  - <font style="color:red">{{supplierName}}</font></p>
		</strong>
	</div>
	<div class="ibox float-e-margins"  style="margin-left:10px;">
		<div class="ibox-content">
			<div id="DataTables_Table_0_wrapper" class="dataTables_wrapper form-inline" role="grid">
				<div class="row">
					<div class="col-sm-12">
						<div id="DataTables_Table_0_filter" >
							<div class="">
							    <td>货号:&nbsp;&nbsp;</td><input type="text" ng-model="taosku" name="taosku" style="width:100px" class="goodsinfo">
								<td>条形码:&nbsp;&nbsp;</td><input type="text" ng-model="bn" name="bn" style="width:100px" class="goodsinfo">
								<td>商品名称:&nbsp;&nbsp;</td><input type="text" ng-model="goodsName" name="goodsName" style="width:100px" class="goodsinfo">&nbsp;&nbsp;&nbsp;
								<button class="btn btn-primary" ng-click="Search()">查询</button>
								<button class="btn btn-primary" ng-click="Reset()">重置</button>
							</div>
						</div>
					</div>
				</div>
				<div >
				<table style="width:100%;" id="datatable" class="table table-striped table-bordered table-hover dataTables-example dataTable">
					<thead >
						<tr>
							<th style="width:2%"><input type="checkbox" ng-model="supplierAllIsSelected" ng-click="selectAll()"/></th>
							<th style="width:15%">货号</th>
							<th style="width:15%">条形码</th>
							<th style="width:18%">商品名称  </th>
							<th style="width:10%">税率</th>
							
				
							<th style="width:10%">箱规</th>
							<th style="width:10%">销售价</th>
							<th id="purTh" style="width:9.5%">最近采购价</th>
							<th id="scrollTh" ></th>
						</tr>
					</thead>
				</table>
				</div>
					<div class="table-body" id="main">
					<table  style="width:100%;"  class="table table-striped table-bordered table-hover dataTables-example dataTable">
					<tbody>
						<tr ng-repeat="supplierGoods in supplierGoodsList" ng-dblclick="dbc($index)">
							<td style="width:2%"><input type="checkbox" ng-model="supplierGoods.IsSelected" ng-click="sel($index);"/></td>
							<td style="width:15%">{{supplierGoods.sku}}</td>
							<td style="width:15%">{{supplierGoods.barcode}}</td>
							<td style="width:18%">
							<a href="#" title={{supplierGoods.goodsName}} style="color: #676a6c;">
							{{supplierGoods.goodsName | cut:false:20:' ...' }}
							 </a>
							</td>
							<td style="width:10%">{{supplierGoods.tax*100}}%</td>							
							<td style="width:10%">{{supplierGoods.packing}}</td>
							<td style="width:10%">{{supplierGoods.salePrice}}</td>
							<td style="width:9.5%">{{supplierGoods.recentPurchasePrice}}</td>
						</tr>

					</tbody>
				</table>
				</div>
				<table style="width:100%; margin-top:10px">
		            <tr>
		                <td align="center">
		                    <button type="button" class="btn btn-primary"  ng-click="Add()">新增</button>&nbsp;&nbsp;
		                    <button type="button" class="btn btn-primary" ng-click="Delete()">删除</button>&nbsp;&nbsp;
		                    <button type="button" class="btn btn-primary" ng-click="returnSupplier()">返回</button>
		                </td>
		            </tr>
	        	</table>
			</div>
		</div>
	</div>
</div>
<script src="<@spring.url '/assets/pagejs/supplier/supplier.js' />"></script>
</@base.page>
